package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 输出GPLT
 */
public class _023 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String s = reader.readLine();
        int G=0;int P=0;int L=0;int T=0;
        for (int i = 0; i <s.length() ; i++) {
            if (s.charAt(i)=='G'||s.charAt(i)=='g'){
                G++;
            }else  if (s.charAt(i)=='P'||s.charAt(i)=='p'){
                P++;
            }else if(s.charAt(i)=='L'||s.charAt(i)=='l'){
                L++;
            }else if (s.charAt(i)=='T'||s.charAt(i)=='t'){
                T++;
            }
        }
        while (G>0||P>0||L>0||T>0){
            if (G>0){
                System.out.print("G");
                G--;
            }
            if (P>0){
                System.out.print("P");
                P--;
            }
            if (L>0){
                System.out.print("L");
                L--;
            }
            if (T>0){
                System.out.print("T");
                T--;
            }
        }
    }
}
